package com.chuangan.releasetask.mapper;

import com.chuangan.releasetask.dto.NewcomerDTO;
import com.chuangan.releasetask.dto.WebDTO;
import com.chuangan.releasetask.pojo.BonusRecord;
import com.chuangan.releasetask.pojo.FeedBack;
import com.chuangan.releasetask.pojo.NewcomerAward;
import com.chuangan.releasetask.pojo.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * @Author: zihua
 * @Date: 2020/7/6 13:56
 * @Version 1.0
 */
@Component
public interface UserMapper {

    //用户注册
    void register(WebDTO webDTO);

    //根据手机号查询是否注册
    User findOneUser(String userAccount);

    //根据id号查询
    User findOneUserByID(int userID);



//    APP登录
    User login(String userAccount);

//    修改登录状态
    void updateStatus( String userAccount);

    void updateUserVerifiedInfo(User user);

    void creditCal(@Param("userBalance")BigDecimal userBalance,@Param("userAccount") String userAccount);

    //更新用户余额
    void updateBalance(@Param("sumBalance") BigDecimal sumBalance,@Param("userAccount") String userAccount);



    boolean updateFace(User user);

    void addInvitedNum(String userAccount);

   // 查询新人奖励
    NewcomerAward newcomerAward(String userAccout);

    //完成的总任务
    List<Map> sumTaskList(String userAccount);

    //添加新的新人奖励
    void addNewcomerAward(String userAccount);

    //新人领取状态修改
    void updateReceiveStatus(NewcomerDTO newcomerDTO);


    void userFeedBack(FeedBack fb);


    //我的任务接口
    List<Map>  selectUserTask(WebDTO webDTO);

    void addBonusDrawRecord(BonusRecord bonusRecord);


    List<BonusRecord> selectSumBonusRecordListByAccount(@Param("bonusName")String bonusName,@Param("userAccount")String userAccount);

   //开通会员
    void updateuserMember(String userAccount, String memberStatus);
}
